Skip to content

feat(native): fold a finished chat turn to its answer and its files - #1276

Merged
omartelo merged 1 commit into
mainfrom
feat/chat-turn-fold
Dec 4, 2026
Merged

omartelo merged 1 commit into
mainfrom
feat/chat-turn-fold

Conversation

@omartelo

@omartelo omartelo commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

What changes

In a long turn every interim text ("now the tests") weighed the same as the conclusion, the same file could be listed several times, rows started on four different left edges, and the turn's end repeated counts already on screen.

  • A finished turn folds. Its calls, thoughts and interim texts go under one line over the answer, Worked for 4m 6s. A click shows them in order, muted, opening under the line where it was clicked. What the person said mid-turn, answers to questions, plans, ! commands, compactions and notices never fold.
  • Each changed file stands once, under the answer, with all the edits the turn made to it. Past six, the first five show over a line for the rest.
  • One left edge. Fold chevrons come after the words, and edit lines lose their inset; the hover fill bleeds past the column instead.
  • Fewer numbers. The closing line is gone, a run of calls no longer carries a time, and a call under a second shows none.
  • A turn that ends while the person is scrolled up in it stays open where it was.

The fold is one pass over the rows the chat already builds (chat_turn_fold.go), shared by every provider's chat. "Copy conversation up to here" still copies the folded work, in the order it went.

Copy

  • Worked for {time} / Worked: the only way back to the work, and the turn's total time; replaces the closing line's count.
  • Stopped after {time}, Failed after {time}: replace the closing line's glyph, which had no visible words.
  • Changed {count} files: the head of the list, replacing EDITED 3 files.
  • Show {count} more files: shown only past six files, so a long list does not push the answer out of view.

no changes and the millisecond unit are removed.

Tests

  • New: the fold as a table (interim texts, steers, questions, stopped, failed, refused login, split turns, no times), the file list and its cap, the fold playing on screen, opened work taller than the view keeping its line, and a turn ending while it is being read.
  • Changed with the contract: the closing line's tests, the EDITED head, the swap of the live line into the closing line, and the milliseconds. Tests of calls inside a finished turn open its fold first.
  • Frame cost on a conversation of 50, 200 and 1000 turns is the same as before (BenchmarkLongChat*).

A long turn weighed every text on the way the same as its conclusion. When
a turn ends, its calls, thoughts and interim texts now fold under one line
over the answer, and the files it changed stand once each under it. Rows
share one left edge, and the closing line and the millisecond times are gone.
@omartelo
omartelo merged commit 33de077 into main Dec 4, 2026
7 of 8 checks passed
@omartelo
omartelo deleted the feat/chat-turn-fold branch December 4, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant